package xcmg.device.dao.mapper.buyBack;


import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.buyBack.BackInboundDetailDO;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface BackInboundDetailMapper {
    int insert(BackInboundDetailDO record);

    List<BackInboundDetailDO> list(@Param("billId") String billId);

    List<BackInboundDetailDO> listForLocationUser(@Param("billId") String billId);

    BackInboundDetailDO findBymaterialNo(@Param("billId") String billId, @Param("materialsNo") String materialsNo);

    int deleteByBillId(@Param("billId") String billId);

    int deleteByBillIdList(@Param("ids") List<String> ids);

    int update(BackInboundDetailDO record);

    int updateSendQty(@Param("backOrder") String backOrder, @Param("materialsNo") String materialsNo, @Param("sendQty") BigDecimal sendQty, @Param("orgId") String orgId);

    int updateStatus(@Param("billId") String billId, @Param("materialsNo") String materialsNo, @Param("status") Integer status);
}